#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
int* getConcatenation(int* nums, int numsSize, int* returnSize) {
    returnSize = (int*)realloc(nums, 2 * numsSize * sizeof(int));
    if (returnSize != NULL)
    {
        nums = returnSize;
        for (int i = numsSize + 1; i < 2 * numsSize; i++)
        {
            nums[i] = nums[i - numsSize];
        }
        return nums;
    }
    return NULL;
}
int main()
{
    int num[4] = { 1,3,2,1 };
    int* p = NULL;
    int* cur = getConcatenation(num, 4, p);
    return 0;
}